package cn.project.lemontree.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
public class Class  implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer classId;
    @TableField(exist = false)
    private Teacher teacher;
    private Integer teacher_id;
    @ApiModelProperty(value = "班级人数")
    private Integer num;
    @ApiModelProperty(value = "班级名称")
    private String className;
    @ApiModelProperty(value = "创建时间",hidden = true)
    private String createTime;
    @ApiModelProperty(value = "班级邀请码")
    private Integer invitationCode;
    @TableLogic
    @ApiModelProperty(hidden = true)
    private Integer deleted;

    public Class(Integer teacher_id,String className){
        this.teacher_id = teacher_id;
        this.className = className;
    }

    public Class(Integer classId){
        this.classId = classId;
    }
}
